#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

int main()
{
    while(1)
    {
        sleep(1);
        printf("hello bit!\n");
    }
    pid_t id = fork();
    if(id == 0)
    {
        //child
        int cnt = 5;
        while(1)
        {
            printf("我是子进程，我还剩下 %d S\n", cnt--);
            sleep(1);
        }
        printf("我是子进程，我已经僵尸了, 等待被检测\n");
        exit(0);
    }
    else{
        //father
        int cnt = 3;
        while(cnt)
        {
            printf("我是父进程，我：%d\n", cnt--);
            sleep(1);
        }
        exit(0);
    }
}
